package com.cxy.datawarehouse.service;

import com.cxy.datawarehouse.entity.StandardCodeDetail;
import com.cxy.datawarehouse.mapper.StandardCodeDetailMapper;
import com.cxy.datawarehouse.mapper.StandardCodeLevelMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@Service
public class StandardCodeDetailService {
    @Resource
    StandardCodeDetailMapper standardCodeDetailMapper;

    public List<StandardCodeDetail> getById(Long id){
        return standardCodeDetailMapper.getStandardCodeDetailsByStandardCodeId(id);
    }

    public void create(StandardCodeDetail standardCodeDetail){
        standardCodeDetailMapper.save(standardCodeDetail);
    }

    public void update(StandardCodeDetail standardCodeDetail){
        standardCodeDetailMapper.save(standardCodeDetail);
    }

    public void deleteById(Long id){
        standardCodeDetailMapper.deleteById(id);
    }
}
